package com.ym.soso.domain.param;

import com.ym.common.annotations.CustomConstraint;
import com.ym.common.constant.BeanCovert;
import com.ym.base.enums.FlagEnum;
import com.ym.soso.domain.entity.ChinaMedicineEntity;
import com.ym.soso.enums.PublishStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 中医堂信息对象 china_medicine
 *
 * @author ym
 * @date 2020-09-01
 */
@ApiModel("中医堂信息-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ChinaMedicineUpdateParam extends BeanCovert<ChinaMedicineEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("医堂编码")
    @NotEmpty(message = "医堂编码不能为空", groups = {Add.class, Update.class})
    @Size(max = 200, message = "医堂编码长度超过{max}", groups = {Add.class, Update.class})
    private String theCode;

    @ApiModelProperty("医堂名称")
    @NotEmpty(message = "医堂名称不能为空", groups = {Add.class, Update.class})
    @Size(max = 200, message = "医堂名称长度超过{max}", groups = {Add.class, Update.class})
    private String theName;

    @ApiModelProperty("重点科室(文本描述)")
    @Size(max = 4000, message = "重点科室长度超过{max}", groups = {Add.class, Update.class})
    private String impDept;

    @ApiModelProperty("重点介绍")
    @Size(max = 200, message = "重点介绍长度超过{max}", groups = {Add.class, Update.class})
    private String theImportDesc;

    @ApiModelProperty("门诊时间")
    @Size(max = 200, message = "门诊时间长度超过{max}", groups = {Add.class, Update.class})
    private String obsTime;

    @ApiModelProperty("中医服务")
    @Size(max = 500, message = "中医服务长度超过{max}", groups = {Add.class, Update.class})
    private String theService;

    @ApiModelProperty("详情介绍")
    @Size(max = 4000, message = "详情介绍长度超过{max}", groups = {Add.class, Update.class})
    private String introduction;

    @ApiModelProperty("icon图")
    @Size(max = 200, message = "icon图长度超过{max}", groups = {Add.class, Update.class})
    private String icon;

    @ApiModelProperty("区域")
    @Size(max = 20, message = "区域长度超过{max}", groups = {Add.class, Update.class})
    private String area;

    @ApiModelProperty("省份")
    @Size(max = 20, message = "省份长度超过{max}", groups = {Add.class, Update.class})
    private String prov;

    @ApiModelProperty("市")
    @Size(max = 20, message = "市长度超过{max}", groups = {Add.class, Update.class})
    private String city;

    @ApiModelProperty("国内排名")
    private Integer landRank;

    @ApiModelProperty("区域排名")
    private Integer areaRank;

    @ApiModelProperty("省排名")
    private Integer provRank;

    @ApiModelProperty("市级排名")
    private Integer cityRank;

    @ApiModelProperty("经度")
    private Double lng;

    @ApiModelProperty("纬度")
    private Double lat;

    @ApiModelProperty("地址")
    @Size(max = 200, message = "地址长度超过{max}", groups = {Add.class, Update.class})
    private String address;

    @ApiModelProperty("联系电话")
    @Size(max = 200, message = "联系电话长度超过{max}", groups = {Add.class, Update.class})
    private String linkPhone;

    @ApiModelProperty("乘车路线")
    @Size(max = 500, message = "乘车路线长度超过{max}", groups = {Add.class, Update.class})
    private String thePath;

    @ApiModelProperty("标签")
    @Size(max = 1000, message = "标签长度超过{max}", groups = {Add.class, Update.class})
    private String tags;

    @ApiModelProperty("发布人")
    private Long publisher;

    @ApiModelProperty("发布时间")
    private Date publishTime;

    @ApiModelProperty("发布状态")
    @NotEmpty(message = "发布状态不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "发布状态长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(PublishStatusEnum.class)
    private String publishStatus;

    @ApiModelProperty("创建人")
    @NotNull(message = "创建人不能为空", groups = {Add.class, Update.class})
    private Long creSb;

    @ApiModelProperty("更新人")
    private Long uptSb;

    @ApiModelProperty("删除标志")
    @NotEmpty(message = "删除标志不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "删除标志长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(FlagEnum.class)
    private String deleted;

    @ApiModelProperty("挂号方式")
    private List<RegistryWayUpdateParam> registryWayParam;

}
